package com.hongyun.tms.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import com.hongyun.tms.common.annotation.Dict;
import com.hongyun.tms.common.annotation.Translate;
import com.hongyun.tms.common.constants.TranslateAnnotationConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 生产计划 响应
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
public class ProPlanVO implements Serializable {

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "船舶ID")
    private Long shipId;

    @ApiModelProperty(value = "码头ID")
    @Translate(fieldName = "dockName", tableName = TranslateAnnotationConstant.TABLE_TMS_DOCK)
    private Long dockId;

    @ApiModelProperty(value = "计划编码")
    private String planCode;

    @ApiModelProperty(value = "船名")
    private String shipName;

    @ApiModelProperty(value = "贸别：内贸，外贸")
    private String tradeType;

    @ApiModelProperty(value = "装卸：装，卸")
    private String loadUnload;

    @ApiModelProperty(value = "泊位")
    private String berthNo;

    @ApiModelProperty(value = "计划作业时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate planTime;

    @ApiModelProperty(value = "前吃水")
    private BigDecimal frontDraft;

    @ApiModelProperty(value = "后吃水")
    private BigDecimal rearDraft;

    @ApiModelProperty(value = "客户ID")
    private Long customerId;

    @ApiModelProperty(value = "客户名称")
    private String customerName;

    @ApiModelProperty(value = "进出，进，出")
    private String inOut;

    @ApiModelProperty(value = "货名")
    private String cargoName;

    @ApiModelProperty(value = "货重")
    private BigDecimal ton;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "0待审1已审")
    private Integer status;

    @ApiModelProperty(value = "作业港区,字典")
    @Dict(code = "PORT_AREA", fieldName = "portAreaName")
    private String portAreaCode;

    @ApiModelProperty(value = "航次")
    private String voyage;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    private List<PordWorkVO> children = Lists.newArrayList();

    @ApiModelProperty(value = "作业记录关联的拖轮")
    private String tugNameAppend;

    @ApiModelProperty(value = "作业单位")
    private String corp;

    @ApiModelProperty(value = "费用")
    private BigDecimal fee;

    @ApiModelProperty(value = "拖轮计费公式备注")
    private String calculateRemark;

    @ApiModelProperty(value = "作业计划的拖轮计费菜单-当前页比如10条，10条的总费")
    private BigDecimal sumFee;
}

